 

import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/generator/swstmarketingticketoffinesell/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/generator/swstmarketingticketoffinesell',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/generator/swstmarketingticketoffinesell/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/generator/swstmarketingticketoffinesell/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/generator/swstmarketingticketoffinesell',
    method: 'put',
    data: obj
  })
}

/**
 * 分转元
 * @param row
 * @param prop
 */
export function fenExYuangettoFixed(row,prop){
  if(!/(\d+|\\.+|\-)/g.test(row[prop])){
    return '';
  }
  let s = (row[prop]/100).toFixed(2);
  return s;
}